#include <cstdio>
#include <iostream>
#include <string>

using namespace std;

int main(int argc, char const* argv[])
{
    string num;
    cin >> num;
    for (int i = 1; i < num.size(); i++) {
        for (int j = i + 1; j < num.size(); j++) {
            string s1 = num.substr(0, i);
            string s2 = num.substr(i, j - i);
            if ((s1.size() > 1 && s1[0] == '0') || (s2.size() > 1 && s2[0] == '0'))
                continue;
            long long  a1 = atoll(s1.c_str());
            long long  a2 = atoll(s2.c_str());
            long long  a3 = a1 + a2;
            string s3 = to_string(a3);
            string now = s1 + s2 + s3;
            while (now.size() < num.size()) {
                s1 = s2;
                s2 = s3;
                a1 = atoll(s1.c_str());
                a2 = atoll(s2.c_str());
                a3 = a1 + a2;
                s3 = to_string(a3);
                now += s3;
            }
            if (now == num)
                return true;
        }
    }
    return false;
    return 0;
}